﻿using SysCommon.Log;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;

namespace AmazonMWS
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        public static void Main(string[] args)
        { 
            Thread feedsThread = new Thread(new ParameterizedThreadStart(Feeds));
            //feedsThread.Start(args);

            Thread ordersThread = new Thread(new ParameterizedThreadStart(Orders));
            ordersThread.Start(args);

            Thread reportsThread = new Thread(new ParameterizedThreadStart(Reports));
            //reportsThread.Start(args);

            Thread productsThread = new Thread(new ParameterizedThreadStart(Products));
            //productsThread.Start(args);
        }

        public static void Feeds(object args)
        {
            SysCommon.WinServices.WinServiceController.Start<FeedsServices>("DsAPI", args);
        }

        public static void Reports(object args)
        {
            SysCommon.WinServices.WinServiceController.Start<ReportsServices>("DsAPI", args); 
        }

        public static void Products(object args)
        {
            SysCommon.WinServices.WinServiceController.Start<ProductsServices>("DsAPI", args);
        }

        public static void Orders(object args)
        {
            SysCommon.WinServices.WinServiceController.Start<OrdersServices>("DsAPI", args);
        }
    }
}
